/**
 * 
 */
package br.com.pim.connection;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 * @author douglas.peixoto
 * 
 */
public class ConnectionFactory {

	public Connection getConnectionSQL2005() throws SQLException {
		try {
			Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");

			return DriverManager
					.getConnection(
							"jdbc:sqlserver://servsql01\\sql2005:1089;databaseName=DEALHR",
							"usuario_integracao", "integracao");
		} catch (ClassNotFoundException e) {
			throw new SQLException(e.getMessage());
		}

	}

	public Connection getConnectionMySQL() throws SQLException {

		try {
			Class.forName("com.mysql.jdbc.Driver");
			return DriverManager.getConnection(
					"jdbc:mysql://localhost:3306/dbpim", "root", "deal123");
		} catch (ClassNotFoundException e) {
			throw new SQLException(e.getMessage());
		}

	}
}
